package com.john.permission.interceptor;

import com.john.permission.pojo.Permission;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

@Component
public class PermissionInterceptor implements HandlerInterceptor {


    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {



        return true;
    }

    public static class Cache{
        public static ConcurrentHashMap<String, List<Permission>> permissionCache = new ConcurrentHashMap<>();
    }
}
